package com.study.sxc.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OpenApiConfig {

    @Bean
    public OpenAPI customOpenAPI() {
        Contact contact = new Contact()
                .name("苏旭超")
                .email("2900252466@qq.com");

        Info info = new Info()
                .title("机房管理系统 API")
                .description("机房管理系统项目的 API 文档")
                .version("1.0")
                .contact(contact);

        return new OpenAPI().info(info);
    }
}